﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VH.SharePoint.Api;
using VH.SharePoint.Api.Blogger;
using VH.SharePoint.Api.MetaWeblog;
using VH.SharePoint.Api.Queries;

namespace VH.SharePoint.Api
{
    public abstract class BlogRepository : IRepository<Blog, String>
    {
        public PostRepository Posts { get; protected set; }
        public MediaRepository Medias { get; protected set; }
        public CategoryRepository Categories { get; protected set; }

        public abstract IEnumerable<Blog> FindAll();
        public abstract IEnumerable<Blog> FindAll(QueryConstraints<Blog> constraints);
        public abstract Blog Get(string id);
        public abstract void Create(Blog entity);
        public abstract void Update(Blog entity);
        public abstract void Delete(Blog entity);
        public abstract void ValidateUser(string username, string password);
        protected abstract void Initialize();

        protected BlogRepository()
        {
            Initialization();
        }

        private void Initialization()
        {
            Initialize();
        }
    }
}
